<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>文字位置提取器</title>
  <style>
    body {
      width: 500px;
      height: 400px;
      padding: 15px;
      font-family: Arial, sans-serif;
    }

    #status {
      margin: 10px 0;
      padding: 10px;
      border-radius: 4px;
    }

    #results {
      margin-top: 15px;
      max-height: 300px;
      overflow-y: auto;
      border: 1px solid #ddd;
      padding: 10px;
      border-radius: 4px;
    }

    .char-info {
      margin: 5px 0;
      padding: 5px;
      border-bottom: 1px solid #eee;
    }

    .position-info {
      font-size: 0.9em;
      color: #666;
    }

    button {
      padding: 8px 15px;
      background: #4CAF50;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }

    button:hover {
      background: #45a049;
    }

    .loading {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid rgba(0, 0, 0, .3);
      border-radius: 50%;
      border-top-color: #4CAF50;
      animation: spin 1s ease-in-out infinite;
      margin-right: 10px;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }
  </style>
</head>

<body>
  <h2>文字位置提取器</h2>
  <p>点击按钮获取当前页面所有文字的位置信息</p>

  <button id="extractBtn">提取文字位置</button>
  <button id="exportBtn">导出为JSON</button>
  <button id="captureBtn">截图并标注文字</button>

  <div id="status"></div>

  <div id="results"></div>

  <script src="popup.js"></script>
</body>

</html>